<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        window.onload=function () {
            let elementById = document.getElementById("fun");
            elementById.onblur = function(){
                console.log("这是一个动态失去焦点")
            }
        }
    </script>
</head>
<body>
    姓名<input type="text" id="fun">
</body>
</html>